unity find gameobject with layer

150

unity find gameobject with layer -

void Start()
{
    GameObject objByName = FindInActiveObjectByName("Cube");
    GameObject objByTag = FindInActiveObjectByTag("CubeTag");
    GameObject objByLayer = FindInActiveObjectByLayer(LayerMask.NameToLayer("CubeLayer"));
}

Comments

Submit
0 Comments